<template>
  <el-aside width="200px" style="height: 100%; background-color: #fff; box-shadow:15px 0 10px -5px #eeeeee;">
    <el-menu :default-openeds="['1', '3']">
      <el-submenu index="1">
        <template slot="title"><i class="el-icon-menu"/>信息管理</template>
        <el-menu-item-group>
          <div class="el-menu-item-group__title" style="padding-top: -10px;
    margin-top: -20px;"></div>
          <el-menu-item index="1-1" @click="JumpToObstacle">报障信息管理</el-menu-item>
          <el-menu-item index="1-2" @click="JumpToPerson" v-if="jurisdiction">成员管理</el-menu-item>
          <el-menu-item index="1-3" @click="JumpToSafe">账号安全</el-menu-item>
        </el-menu-item-group>
      </el-submenu>


      <el-submenu index="2">
        <template slot="title"><i class="el-icon-menu"/>导航二</template>
        <el-menu-item-group>
          <template slot="title">分组一</template>
          <el-menu-item index="2-1">选项1</el-menu-item>
          <el-menu-item index="2-2">选项2</el-menu-item>
        </el-menu-item-group>
        <el-menu-item-group title="分组2">
          <el-menu-item index="2-3">选项3</el-menu-item>
        </el-menu-item-group>
        <el-submenu index="2-4">
          <template slot="title">选项4</template>
          <el-menu-item index="2-4-1">选项4-1</el-menu-item>
        </el-submenu>
      </el-submenu>

    </el-menu>
  </el-aside>
</template>

<script>
  export default {
    name: "MainAside",
    data() {
      return {
        // jurisdiction: false
      }
    },
    methods: {
      JumpToObstacle() {
        this.$router.push('/obstaclemgt')
      },
      JumpToPerson() {
        this.$router.push('/personmgt')
      },
      JumpToSafe() {
        this.$router.push('/safe')
      },
    },
    computed: {
      jurisdiction() {
        return this.$store.getters.user.identity !== '学生助理';
      }
    }
  }
</script>

<style scoped>
  .el-menu-item-group__title {
    padding: 0;
    margin: 0;
  }
</style>